
//
//  YIem_Explore_ViewModel.m
//  B段_开眼
//
//  Created by YIem on 16/4/29.
//  Copyright © 2016年 Howie. All rights reserved.
//

#import "YIem_Explore_ViewModel.h"

@implementation YIem_Explore_ViewModel
+ (void)getDataWithPage:(NSString *)nextPage andUpdate:(BOOL)isUpdate andBlock:(void (^)(NSMutableArray *, NSString *))tableArr
{
    NSMutableArray *array = [NSMutableArray array];
    [CustomerNetWorking connectWithURL:nextPage  andUpdate:isUpdate andBlock:^(id response) {

        for (NSDictionary *dic in [response objectForKey:@"itemList"] ) {
            
        YIem_ExploreCellModel *model = [[YIem_ExploreCellModel alloc] init];
            [model setValuesForKeysWithDictionary:[dic objectForKey:@"data"]];
            
            [array addObject:model];
        }

        tableArr(array, [response objectForKey:@"nextPublishTime"]);
    }];
    
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
